<?
 class BasketBO extends BusinessObject {
      function setAttributes()
	{
			$this->fields   = array(
				'id'	 	        => 'bskID',
				'create_date'   => 'bskDate',
		   	'user'  	      => 'bskUser',
				'total'	      	=> 'bskTotal',
				'com_total'	    => 'bskComTotal',
				'site'	        => 'bskSite',
				'last_access'   => 'bskLastAccess',
				'agentID'       => 'bskAgentID',
				'affiliate_id'  => 'bskAffiliateID'
			);
			BusinessObject::setAttributes();
	}
		/* constructor */
	function BasketBO (){
			BusinessObject::BusinessObject ("baskets");
			 $this->setAttributes();
		}

	function Exist($id_){
         $parts = new BasketPartBO();
	 $parts->basket = $this->id;
	 $parts->Load();
	 while($parts->Next())
	 {
	   if($parts->item == $id_){ return true; } 
	 }
	 return false;
 	}
}
?>
